package com.joshua.spring.exception;

import com.joshua.spring.entity.vo.GlobalResponse;
import org.springframework.http.HttpStatus;

/**
 * projectName feign-test
 * package com.joshua.spring.exception
 * classname  ExceptionEnumInter
 * <p>
 * description 全局异常抽象
 * </p>
 *
 * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
 * @date 2020/11/8 21:30
 */
public interface ExceptionEnumInter {
    /**
     * description: 
     *
     * @param 
     * @return {@link String}
     * @throws
     * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
     * @date 2020/11/8 22:50
     */
    String getCode();

    /**
     * description: 
     *
     * @param 
     * @return {@link java.lang.String}
     * @throws
     * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
     * @date 2020/11/8 22:54
     */
    String getMsgFormatter();

    /**
     * description:
     *
     * @param
     * @return {@link org.springframework.http.HttpStatus}
     * @throws
     * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
     * @date 2020/11/8 22:56
     */
    HttpStatus getHttpStatus();

    /**
     * description: 
     *
     * @param msg
     * @return {@link com.joshua.spring.exception.MicroServiceException}
     * @throws
     * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
     * @date 2020/11/8 23:14
     */
    default MicroServiceException bdException(String... msg) {
        return MicroServiceException.builder(this, msg);
    }
}
